<template>
	<view>
		<view class="">
			<u-search placeholder="请输入关键字搜索" :focus="focus" :animation="true" :show-action="false" v-model="keyword"></u-search>
		</view>
		<view class="waterfallWapper">
			<u-waterfall v-model="flowList" ref="uWaterfall">
				<template v-slot:left="{ leftList }">
					<view class="demo-warter" v-for="(item, index) in leftList" :key="index" @click="onGoodsDetails(item.id)">
						<u-lazy-load threshold="-450" border-radius="10" :image="item.images_format[0]"
							:index="index"></u-lazy-load>
						<view class="demo-title">{{ item.name }}</view>
						<view class="demo-price">{{'￥'+ item.min_price }}元</view>
						<!-- 							<view class="demo-tag">
							<view class="demo-tag-owner">自营</view>
							<view class="demo-tag-text">放心购</view>
						</view> -->
						<!-- <view class="demo-shop">{{ item.shop }}</view> -->
					</view>
				</template>
				<template v-slot:right="{ rightList }">
					<view class="demo-warter" v-for="(item, index) in rightList" :key="index" @click="onGoodsDetails(item.id)">
						<u-lazy-load threshold="-450" border-radius="10" :image="item.images_format[0]"
							:index="index"></u-lazy-load>
						<view class="demo-title">{{ item.name }}</view>
						<view class="demo-price">{{ item.min_price }}元</view>
						<!-- 							<view class="demo-tag">
							<view class="demo-tag-owner">自营</view>
							<view class="demo-tag-text">放心购</view>
						</view> -->
						<!-- <view class="demo-shop">{{ item.shop }}</view> -->
					</view>
				</template>
			</u-waterfall>
			<u-loadmore v-if="isShow" bg-color="rgb(240, 240, 240)" :status="loadStatus" @loadmore="getGoodLists()"></u-loadmore>
			</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				// 瀑布流
				loadStatus: 'loadmore',
				flowList: [],
				page: 1,
				keyword:'',
				focus:false,
				isShow:false
			};
		},
		onLoad(options) {
			if(options.isFlag){
				this.focus = true;
			}
		},
		methods:{
			// 瀑布流
			clear() {
				this.$refs.uWaterfall.clear();
			},
			// 瀑布流end
			onQuery() {},
		}
	}
</script>

<style lang="scss">

</style>
